<!DOCTYPE html>

<html lang="en" data-content_root="../">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

  <title>CMakePackageConfigHelpers &mdash; CMake 4.1.1 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a2c47e09" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css?v=4d06bd55" />
    
    <script src="../_static/documentation_options.js?v=e6a937a4"></script>
    <script src="../_static/doctools.js?v=9bcbadda"></script>
    <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
    
    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMakePrintHelpers" href="CMakePrintHelpers.html" />
    <link rel="prev" title="CMakeGraphVizOptions" href="CMakeGraphVizOptions.html" />
 

  </head><body>
    <input id="sidebar-check" type="checkbox" />
    <label id="sidebar-overlay" for="sidebar-check"></label>



    <div class="related relbar1" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="CMakePrintHelpers.html" title="CMakePrintHelpers"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="CMakeGraphVizOptions.html" title="CMakeGraphVizOptions"
             accesskey="P">previous</a> |</li>
  <li>
    <label class="sidebar-toggle" for="sidebar-check"></label>
  </li>
  <li class="rootlink">
    <img src="../_static/cmake-logo-16.png" width="16" height="16" alt=""/>
    <a href="https://cmake.org/">CMake 4.1.1</a>
    <span class="reldelim1"> &#187;</span>
  </li>
  <li>
    <a href="../index.html">Documentation</a> &#187;
  </li>

          <li class="nav-item nav-item-1"><a href="../manual/cmake-modules.7.html" accesskey="U">cmake-modules(7)</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">CMakePackageConfigHelpers</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="cmakepackageconfighelpers">
<span id="module:CMakePackageConfigHelpers"></span><h1>CMakePackageConfigHelpers<a class="headerlink" href="#cmakepackageconfighelpers" title="Link to this heading">¶</a></h1>
<p>Helper functions for creating config files that can be included by other
projects to find and use a package.</p>
<section id="generating-a-package-configuration-file">
<h2>Generating a Package Configuration File<a class="headerlink" href="#generating-a-package-configuration-file" title="Link to this heading">¶</a></h2>
<dl class="cmake command">
<dt class="sig sig-object cmake" id="command:configure_package_config_file">
<span class="sig-name descname"><span class="pre">configure_package_config_file</span></span><a class="headerlink" href="#command:configure_package_config_file" title="Link to this definition">¶</a></dt>
<dd><p>Create a config file for a project:</p>
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">configure_package_config_file(</span><span class="nv">&lt;input&gt;</span><span class="w"> </span><span class="nv">&lt;output&gt;</span>
<span class="w">  </span><span class="no">INSTALL_DESTINATION</span><span class="w"> </span><span class="nv">&lt;path&gt;</span>
<span class="w">  </span><span class="p">[</span><span class="no">PATH_VARS</span><span class="w"> </span><span class="nv">&lt;var1&gt;</span><span class="w"> </span><span class="nv">&lt;var2&gt;</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="nv">&lt;varN&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="p">[</span><span class="no">NO_SET_AND_CHECK_MACRO</span><span class="p">]</span>
<span class="w">  </span><span class="p">[</span><span class="no">NO_CHECK_REQUIRED_COMPONENTS_MACRO</span><span class="p">]</span>
<span class="w">  </span><span class="p">[</span><span class="no">INSTALL_PREFIX</span><span class="w"> </span><span class="nv">&lt;path&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="nf">)</span>
</pre></div>
</div>
</dd></dl>

<p><code class="docutils literal notranslate"><span class="pre">configure_package_config_file()</span></code> should be used instead of the plain
<span class="target" id="index-0-command:configure_file"></span><a class="reference internal" href="../command/configure_file.html#command:configure_file" title="configure_file"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">configure_file()</span></code></a> command when creating the <code class="docutils literal notranslate"><span class="pre">&lt;PackageName&gt;Config.cmake</span></code>
or <code class="docutils literal notranslate"><span class="pre">&lt;PackageName&gt;-config.cmake</span></code> file for installing a project or library.
It helps make the resulting package relocatable by avoiding hardcoded paths
in the installed <code class="docutils literal notranslate"><span class="pre">&lt;PackageName&gt;Config.cmake</span></code> file.</p>
<p>In a <code class="docutils literal notranslate"><span class="pre">FooConfig.cmake</span></code> file there may be code like this to make the install
destinations known to the using project:</p>
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">set(</span><span class="no">FOO_INCLUDE_DIR</span><span class="w">   </span><span class="s">&quot;@CMAKE_INSTALL_FULL_INCLUDEDIR@&quot;</span><span class="w"> </span><span class="nf">)</span>
<span class="nf">set(</span><span class="no">FOO_DATA_DIR</span><span class="w">   </span><span class="s">&quot;@CMAKE_INSTALL_PREFIX@/@RELATIVE_DATA_INSTALL_DIR@&quot;</span><span class="w"> </span><span class="nf">)</span>
<span class="nf">set(</span><span class="no">FOO_ICONS_DIR</span><span class="w">   </span><span class="s">&quot;@CMAKE_INSTALL_PREFIX@/share/icons&quot;</span><span class="w"> </span><span class="nf">)</span>
<span class="c">#...logic to determine installedPrefix from the own location...</span>
<span class="nf">set(</span><span class="no">FOO_CONFIG_DIR</span><span class="w">  </span><span class="s">&quot;${installedPrefix}/@CONFIG_INSTALL_DIR@&quot;</span><span class="w"> </span><span class="nf">)</span>
</pre></div>
</div>
<p>All four options shown above are not sufficient  The first three hardcode the
absolute directory locations.  The fourth case works only if the logic to
determine the <code class="docutils literal notranslate"><span class="pre">installedPrefix</span></code> is correct, and if <code class="docutils literal notranslate"><span class="pre">CONFIG_INSTALL_DIR</span></code>
contains a relative path, which in general cannot be guaranteed.  This has the
effect that the resulting <code class="docutils literal notranslate"><span class="pre">FooConfig.cmake</span></code> file would work poorly under
Windows and macOS, where users are used to choosing the install location of a
binary package at install time, independent from how
<span class="target" id="index-0-variable:CMAKE_INSTALL_PREFIX"></span><a class="reference internal" href="../variable/CMAKE_INSTALL_PREFIX.html#variable:CMAKE_INSTALL_PREFIX" title="CMAKE_INSTALL_PREFIX"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_INSTALL_PREFIX</span></code></a> was set at build/cmake time.</p>
<p>Using <code class="docutils literal notranslate"><span class="pre">configure_package_config_file()</span></code> helps.  If used correctly, it makes
the resulting <code class="docutils literal notranslate"><span class="pre">FooConfig.cmake</span></code> file relocatable.  Usage:</p>
<ol class="arabic simple">
<li><p>Write a <code class="docutils literal notranslate"><span class="pre">FooConfig.cmake.in</span></code> file as you are used to.</p></li>
<li><p>Insert a line at the top containing only the string <code class="docutils literal notranslate"><span class="pre">&#64;PACKAGE_INIT&#64;</span></code>.</p></li>
<li><p>Instead of <code class="docutils literal notranslate"><span class="pre">set(FOO_DIR</span> <span class="pre">&quot;&#64;SOME_INSTALL_DIR&#64;&quot;)</span></code>, use
<code class="docutils literal notranslate"><span class="pre">set(FOO_DIR</span> <span class="pre">&quot;&#64;PACKAGE_SOME_INSTALL_DIR&#64;&quot;)</span></code> (this must be after the
<code class="docutils literal notranslate"><span class="pre">&#64;PACKAGE_INIT&#64;</span></code> line).</p></li>
<li><p>Instead of using the normal <span class="target" id="index-1-command:configure_file"></span><a class="reference internal" href="../command/configure_file.html#command:configure_file" title="configure_file"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">configure_file()</span></code></a> command, use
<code class="docutils literal notranslate"><span class="pre">configure_package_config_file()</span></code>.</p></li>
</ol>
<p>The <code class="docutils literal notranslate"><span class="pre">&lt;input&gt;</span></code> and <code class="docutils literal notranslate"><span class="pre">&lt;output&gt;</span></code> arguments are the input and output file, the
same way as in <span class="target" id="index-2-command:configure_file"></span><a class="reference internal" href="../command/configure_file.html#command:configure_file" title="configure_file"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">configure_file()</span></code></a>.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">&lt;path&gt;</span></code> given to <code class="docutils literal notranslate"><span class="pre">INSTALL_DESTINATION</span></code> must be the destination where
the <code class="docutils literal notranslate"><span class="pre">FooConfig.cmake</span></code> file will be installed to.  This path can either be
absolute, or relative to the <code class="docutils literal notranslate"><span class="pre">INSTALL_PREFIX</span></code> path.</p>
<p>The variables <code class="docutils literal notranslate"><span class="pre">&lt;var1&gt;</span></code> to <code class="docutils literal notranslate"><span class="pre">&lt;varN&gt;</span></code> given as <code class="docutils literal notranslate"><span class="pre">PATH_VARS</span></code> are the
variables which contain install destinations.  For each of them, the macro will
create a helper variable <code class="docutils literal notranslate"><span class="pre">PACKAGE_&lt;var...&gt;</span></code>.  These helper variables must be
used in the <code class="docutils literal notranslate"><span class="pre">FooConfig.cmake.in</span></code> file for setting the installed location.
They are calculated by <code class="docutils literal notranslate"><span class="pre">configure_package_config_file()</span></code> so that they are
always relative to the installed location of the package.  This works both for
relative and also for absolute locations.  For absolute locations, it works
only if the absolute location is a subdirectory of <code class="docutils literal notranslate"><span class="pre">INSTALL_PREFIX</span></code>.</p>
<div class="versionadded">
<p><span class="versionmodified added">Added in version 3.30: </span>The variable <code class="docutils literal notranslate"><span class="pre">PACKAGE_PREFIX_DIR</span></code> will always be defined after the
<code class="docutils literal notranslate"><span class="pre">&#64;PACKAGE_INIT&#64;</span></code> line.  It will hold the value of the base install
location.  In general, variables defined via the <code class="docutils literal notranslate"><span class="pre">PATH_VARS</span></code> mechanism
should be used instead, but <code class="docutils literal notranslate"><span class="pre">PACKAGE_PREFIX_DIR</span></code> can be used for those
cases not easily handled by <code class="docutils literal notranslate"><span class="pre">PATH_VARS</span></code>, such as for files installed
directly to the base install location rather than a subdirectory of it.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>When consumers of the generated file use CMake 3.29 or older, the value
of <code class="docutils literal notranslate"><span class="pre">PACKAGE_PREFIX_DIR</span></code> can be changed by a call to
<span class="target" id="index-0-command:find_dependency"></span><a class="reference internal" href="CMakeFindDependencyMacro.html#command:find_dependency" title="find_dependency"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_dependency()</span></code></a> or <span class="target" id="index-0-command:find_package"></span><a class="reference internal" href="../command/find_package.html#command:find_package" title="find_package"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_package()</span></code></a>.
If a project relies on <code class="docutils literal notranslate"><span class="pre">PACKAGE_PREFIX_DIR</span></code>, it is the project's
responsibility to ensure that the value of <code class="docutils literal notranslate"><span class="pre">PACKAGE_PREFIX_DIR</span></code> is
preserved across any such calls, or any other calls which might include
another file generated by <code class="docutils literal notranslate"><span class="pre">configure_package_config_file()</span></code>.</p>
</div>
</div>
<div class="versionadded">
<p><span class="versionmodified added">Added in version 3.1: </span>If the <code class="docutils literal notranslate"><span class="pre">INSTALL_PREFIX</span></code> argument is passed, this is used as the base path to
calculate all the relative paths.  The <code class="docutils literal notranslate"><span class="pre">&lt;path&gt;</span></code> argument must be an absolute
path.  If this argument is not passed, the <span class="target" id="index-1-variable:CMAKE_INSTALL_PREFIX"></span><a class="reference internal" href="../variable/CMAKE_INSTALL_PREFIX.html#variable:CMAKE_INSTALL_PREFIX" title="CMAKE_INSTALL_PREFIX"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_INSTALL_PREFIX</span></code></a>
variable will be used instead.  The default value is good when generating a
<code class="docutils literal notranslate"><span class="pre">FooConfig.cmake</span></code> file to use your package from the install tree.  When
generating a <code class="docutils literal notranslate"><span class="pre">FooConfig.cmake</span></code> file to use your package from the build tree,
this option should be used.</p>
</div>
<p>By default, <code class="docutils literal notranslate"><span class="pre">configure_package_config_file()</span></code> also generates two helper
macros, <code class="docutils literal notranslate"><span class="pre">set_and_check()</span></code> and <code class="docutils literal notranslate"><span class="pre">check_required_components()</span></code>, into the
<code class="docutils literal notranslate"><span class="pre">FooConfig.cmake</span></code> file.</p>
<p><code class="docutils literal notranslate"><span class="pre">set_and_check()</span></code> should be used instead of the normal <span class="target" id="index-0-command:set"></span><a class="reference internal" href="../command/set.html#command:set" title="set"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">set()</span></code></a> command
for setting directories and file locations.  In addition to setting the
variable, it also checks that the referenced file or directory actually exists
and fails with a fatal error if it doesn't.  This ensures that the generated
<code class="docutils literal notranslate"><span class="pre">FooConfig.cmake</span></code> file does not contain wrong references.
Add the <code class="docutils literal notranslate"><span class="pre">NO_SET_AND_CHECK_MACRO</span></code> option to prevent the generation of the
<code class="docutils literal notranslate"><span class="pre">set_and_check()</span></code> macro in the <code class="docutils literal notranslate"><span class="pre">FooConfig.cmake</span></code> file.</p>
<p><code class="docutils literal notranslate"><span class="pre">check_required_components(&lt;PackageName&gt;)</span></code> should be called at the end of
the <code class="docutils literal notranslate"><span class="pre">FooConfig.cmake</span></code> file. This macro checks whether all requested,
non-optional components have been found, and if this is not the case, it sets
the <code class="docutils literal notranslate"><span class="pre">Foo_FOUND</span></code> variable to <code class="docutils literal notranslate"><span class="pre">FALSE</span></code> so that the package is considered to
be not found.  It does that by testing the <code class="docutils literal notranslate"><span class="pre">Foo_&lt;Component&gt;_FOUND</span></code>
variables for all requested required components.  This macro should be
called even if the package doesn't provide any components to make sure
users are not specifying components erroneously.  Add the
<code class="docutils literal notranslate"><span class="pre">NO_CHECK_REQUIRED_COMPONENTS_MACRO</span></code> option to prevent the generation of the
<code class="docutils literal notranslate"><span class="pre">check_required_components()</span></code> macro in the <code class="docutils literal notranslate"><span class="pre">FooConfig.cmake</span></code> file.</p>
<p>See also <a class="reference internal" href="#cmakepackageconfighelpers-examples"><span class="std std-ref">Example Generating Package Files</span></a>.</p>
</section>
<section id="generating-a-package-version-file">
<h2>Generating a Package Version File<a class="headerlink" href="#generating-a-package-version-file" title="Link to this heading">¶</a></h2>
<dl class="cmake command">
<dt class="sig sig-object cmake" id="command:write_basic_package_version_file">
<span class="sig-name descname"><span class="pre">write_basic_package_version_file</span></span><a class="headerlink" href="#command:write_basic_package_version_file" title="Link to this definition">¶</a></dt>
<dd><p>Create a version file for a project:</p>
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">write_basic_package_version_file(</span><span class="nv">&lt;filename&gt;</span>
<span class="w">  </span><span class="p">[</span><span class="no">VERSION</span><span class="w"> </span><span class="nv">&lt;major.minor.patch&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="no">COMPATIBILITY</span><span class="w"> </span><span class="o">&lt;</span><span class="nb">AnyNewerVersion</span><span class="p">|</span><span class="nb">SameMajorVersion</span><span class="p">|</span><span class="nb">SameMinorVersion</span><span class="p">|</span><span class="nb">ExactVersion</span><span class="o">&gt;</span>
<span class="w">  </span><span class="p">[</span><span class="no">ARCH_INDEPENDENT</span><span class="p">]</span><span class="w"> </span><span class="nf">)</span>
</pre></div>
</div>
</dd></dl>

<p>Writes a file for use as a <code class="docutils literal notranslate"><span class="pre">&lt;PackageName&gt;ConfigVersion.cmake</span></code> file to
<code class="docutils literal notranslate"><span class="pre">&lt;filename&gt;</span></code>.  See the documentation of <span class="target" id="index-1-command:find_package"></span><a class="reference internal" href="../command/find_package.html#command:find_package" title="find_package"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_package()</span></code></a> for
details on such files.</p>
<p><code class="docutils literal notranslate"><span class="pre">&lt;filename&gt;</span></code> is the output filename, which should be in the build tree.
<code class="docutils literal notranslate"><span class="pre">&lt;major.minor.patch&gt;</span></code> is the version number of the project to be installed.</p>
<p>If no <code class="docutils literal notranslate"><span class="pre">VERSION</span></code> is given, the <span class="target" id="index-0-variable:PROJECT_VERSION"></span><a class="reference internal" href="../variable/PROJECT_VERSION.html#variable:PROJECT_VERSION" title="PROJECT_VERSION"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">PROJECT_VERSION</span></code></a> variable is used.
If this hasn't been set, it errors out.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">COMPATIBILITY</span></code> mode <code class="docutils literal notranslate"><span class="pre">AnyNewerVersion</span></code> means that the installed
package version will be considered compatible if it is newer or exactly the
same as the requested version.  This mode should be used for packages which
are fully backward compatible, also across major versions.
If <code class="docutils literal notranslate"><span class="pre">SameMajorVersion</span></code> is used instead, then the behavior differs from
<code class="docutils literal notranslate"><span class="pre">AnyNewerVersion</span></code> in that the major version number must be the same as
requested, e.g.  version 2.0 will not be considered compatible if 1.0 is
requested.  This mode should be used for packages which guarantee backward
compatibility within the same major version.
If <code class="docutils literal notranslate"><span class="pre">SameMinorVersion</span></code> is used, the behavior is the same as
<code class="docutils literal notranslate"><span class="pre">SameMajorVersion</span></code>, but both major and minor version must be the same as
requested, e.g version 0.2 will not be compatible if 0.1 is requested.
If <code class="docutils literal notranslate"><span class="pre">ExactVersion</span></code> is used, then the package is only considered compatible if
the requested version matches exactly its own version number (not considering
the tweak version).  For example, version 1.2.3 of a package is only
considered compatible to requested version 1.2.3.  This mode is for packages
without compatibility guarantees.
If your project has more elaborate version matching rules, you will need to
write your own custom <code class="docutils literal notranslate"><span class="pre">&lt;PackageName&gt;ConfigVersion.cmake</span></code> file instead of
using this macro.</p>
<div class="versionadded">
<p><span class="versionmodified added">Added in version 3.11: </span>The <code class="docutils literal notranslate"><span class="pre">SameMinorVersion</span></code> compatibility mode.</p>
</div>
<div class="versionadded">
<p><span class="versionmodified added">Added in version 3.14: </span>If <code class="docutils literal notranslate"><span class="pre">ARCH_INDEPENDENT</span></code> is given, the installed package version will be
considered compatible even if it was built for a different architecture than
the requested architecture.  Otherwise, an architecture check will be performed,
and the package will be considered compatible only if the architecture matches
exactly.  For example, if the package is built for a 32-bit architecture, the
package is only considered compatible if it is used on a 32-bit architecture,
unless <code class="docutils literal notranslate"><span class="pre">ARCH_INDEPENDENT</span></code> is given, in which case the package is considered
compatible on any architecture.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p><code class="docutils literal notranslate"><span class="pre">ARCH_INDEPENDENT</span></code> is intended for header-only libraries or
similar packages with no binaries.</p>
</div>
</div>
<div class="versionadded">
<p><span class="versionmodified added">Added in version 3.19: </span>The version file generated by <code class="docutils literal notranslate"><span class="pre">AnyNewerVersion</span></code>, <code class="docutils literal notranslate"><span class="pre">SameMajorVersion</span></code> and
<code class="docutils literal notranslate"><span class="pre">SameMinorVersion</span></code> arguments of <code class="docutils literal notranslate"><span class="pre">COMPATIBILITY</span></code> handle the version range,
if one is specified (see <span class="target" id="index-2-command:find_package"></span><a class="reference internal" href="../command/find_package.html#command:find_package" title="find_package"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_package()</span></code></a> command for the details).
<code class="docutils literal notranslate"><span class="pre">ExactVersion</span></code> mode is incompatible with version ranges and will display an
author warning if one is specified.</p>
</div>
<p>Internally, this macro executes <span class="target" id="index-3-command:configure_file"></span><a class="reference internal" href="../command/configure_file.html#command:configure_file" title="configure_file"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">configure_file()</span></code></a> to create the
resulting version file.  Depending on the <code class="docutils literal notranslate"><span class="pre">COMPATIBILITY</span></code>, the corresponding
<code class="docutils literal notranslate"><span class="pre">BasicConfigVersion-&lt;COMPATIBILITY&gt;.cmake.in</span></code> file is used.
Please note that these files are internal to CMake and you should not call
<span class="target" id="index-4-command:configure_file"></span><a class="reference internal" href="../command/configure_file.html#command:configure_file" title="configure_file"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">configure_file()</span></code></a> on them yourself, but they can be used as a starting
point to create more sophisticated custom <code class="docutils literal notranslate"><span class="pre">&lt;PackageName&gt;ConfigVersion.cmake</span></code>
files.</p>
</section>
<section id="generating-an-apple-platform-selection-file">
<h2>Generating an Apple Platform Selection File<a class="headerlink" href="#generating-an-apple-platform-selection-file" title="Link to this heading">¶</a></h2>
<dl class="cmake command">
<dt class="sig sig-object cmake" id="command:generate_apple_platform_selection_file">
<span class="sig-name descname"><span class="pre">generate_apple_platform_selection_file</span></span><a class="headerlink" href="#command:generate_apple_platform_selection_file" title="Link to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified added">Added in version 3.29.</span></p>
</div>
<p>Create an Apple platform selection file:</p>
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">generate_apple_platform_selection_file(</span><span class="nv">&lt;filename&gt;</span>
<span class="w">  </span><span class="no">INSTALL_DESTINATION</span><span class="w"> </span><span class="nv">&lt;path&gt;</span>
<span class="w">  </span><span class="p">[</span><span class="no">INSTALL_PREFIX</span><span class="w"> </span><span class="nv">&lt;path&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="p">[</span><span class="no">MACOS_INCLUDE_FILE</span><span class="w"> </span><span class="nv">&lt;file&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="p">[</span><span class="no">IOS_INCLUDE_FILE</span><span class="w"> </span><span class="nv">&lt;file&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="p">[</span><span class="no">IOS_SIMULATOR_INCLUDE_FILE</span><span class="w"> </span><span class="nv">&lt;file&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="p">[</span><span class="no">IOS_CATALYST_INCLUDE_FILE</span><span class="w"> </span><span class="nv">&lt;file&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="p">[</span><span class="no">TVOS_INCLUDE_FILE</span><span class="w"> </span><span class="nv">&lt;file&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="p">[</span><span class="no">TVOS_SIMULATOR_INCLUDE_FILE</span><span class="w"> </span><span class="nv">&lt;file&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="p">[</span><span class="no">WATCHOS_INCLUDE_FILE</span><span class="w"> </span><span class="nv">&lt;file&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="p">[</span><span class="no">WATCHOS_SIMULATOR_INCLUDE_FILE</span><span class="w"> </span><span class="nv">&lt;file&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="p">[</span><span class="no">VISIONOS_INCLUDE_FILE</span><span class="w"> </span><span class="nv">&lt;file&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="p">[</span><span class="no">VISIONOS_SIMULATOR_INCLUDE_FILE</span><span class="w"> </span><span class="nv">&lt;file&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="p">[</span><span class="no">ERROR_VARIABLE</span><span class="w"> </span><span class="nv">&lt;variable&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="nf">)</span>
</pre></div>
</div>
<p>Write a file that includes an Apple-platform-specific <code class="docutils literal notranslate"><span class="pre">.cmake</span></code> file,
e.g., for use as <code class="docutils literal notranslate"><span class="pre">&lt;PackageName&gt;Config.cmake</span></code>.  This can be used in
conjunction with the <code class="docutils literal notranslate"><span class="pre">XCFRAMEWORK_LOCATION</span></code> argument of
<span class="target" id="index-0-command:export"></span><a class="reference internal" href="../command/export.html#setup" title="export(setup)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">export(SETUP)</span></code></a> to export packages in a way that a project
built for any Apple platform can use them.</p>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">INSTALL_DESTINATION</span> <span class="pre">&lt;path&gt;</span></code></dt><dd><p>Path to which the generated file will be installed by the caller, e.g.,
via <span class="target" id="index-0-command:install"></span><a class="reference internal" href="../command/install.html#files" title="install(files)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">install(FILES)</span></code></a>.  The path may be either relative to the
<code class="docutils literal notranslate"><span class="pre">INSTALL_PREFIX</span></code> or absolute.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">INSTALL_PREFIX</span> <span class="pre">&lt;path&gt;</span></code></dt><dd><p>Path prefix to which the package will be installed by the caller.
The <code class="docutils literal notranslate"><span class="pre">&lt;path&gt;</span></code> argument must be an absolute path.  If this argument
is not passed, the <span class="target" id="index-2-variable:CMAKE_INSTALL_PREFIX"></span><a class="reference internal" href="../variable/CMAKE_INSTALL_PREFIX.html#variable:CMAKE_INSTALL_PREFIX" title="CMAKE_INSTALL_PREFIX"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_INSTALL_PREFIX</span></code></a> variable will be
used instead.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">MACOS_INCLUDE_FILE</span> <span class="pre">&lt;file&gt;</span></code></dt><dd><p>File to include if the platform is macOS.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">IOS_INCLUDE_FILE</span> <span class="pre">&lt;file&gt;</span></code></dt><dd><p>File to include if the platform is iOS.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">IOS_SIMULATOR_INCLUDE_FILE</span> <span class="pre">&lt;file&gt;</span></code></dt><dd><p>File to include if the platform is iOS Simulator.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">IOS_CATALYST_INCLUDE_FILE</span> <span class="pre">&lt;file&gt;</span></code></dt><dd><div class="versionadded">
<p><span class="versionmodified added">Added in version 3.31.</span></p>
</div>
<p>File to include if the platform is iOS Catalyst.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">TVOS_INCLUDE_FILE</span> <span class="pre">&lt;file&gt;</span></code></dt><dd><p>File to include if the platform is tvOS.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">TVOS_SIMULATOR_INCLUDE_FILE</span> <span class="pre">&lt;file&gt;</span></code></dt><dd><p>File to include if the platform is tvOS Simulator.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">WATCHOS_INCLUDE_FILE</span> <span class="pre">&lt;file&gt;</span></code></dt><dd><p>File to include if the platform is watchOS.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">WATCHOS_SIMULATOR_INCLUDE_FILE</span> <span class="pre">&lt;file&gt;</span></code></dt><dd><p>File to include if the platform is watchOS Simulator.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">VISIONOS_INCLUDE_FILE</span> <span class="pre">&lt;file&gt;</span></code></dt><dd><p>File to include if the platform is visionOS.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">VISIONOS_SIMULATOR_INCLUDE_FILE</span> <span class="pre">&lt;file&gt;</span></code></dt><dd><p>File to include if the platform is visionOS Simulator.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">ERROR_VARIABLE</span> <span class="pre">&lt;variable&gt;</span></code></dt><dd><p>If the consuming project is built for an unsupported platform,
set <code class="docutils literal notranslate"><span class="pre">&lt;variable&gt;</span></code> to an error message.  The includer may use this
information to pretend the package was not found.  If this option
is not given, the default behavior is to issue a fatal error.</p>
</dd>
</dl>
<p>If any of the optional include files is not specified, and the consuming
project is built for its corresponding platform, the generated file will
consider the platform to be unsupported.  The behavior is determined
by the <code class="docutils literal notranslate"><span class="pre">ERROR_VARIABLE</span></code> option.</p>
</dd></dl>

</section>
<section id="generating-an-apple-architecture-selection-file">
<h2>Generating an Apple Architecture Selection File<a class="headerlink" href="#generating-an-apple-architecture-selection-file" title="Link to this heading">¶</a></h2>
<dl class="cmake command">
<dt class="sig sig-object cmake" id="command:generate_apple_architecture_selection_file">
<span class="sig-name descname"><span class="pre">generate_apple_architecture_selection_file</span></span><a class="headerlink" href="#command:generate_apple_architecture_selection_file" title="Link to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified added">Added in version 3.29.</span></p>
</div>
<p>Create an Apple architecture selection file:</p>
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">generate_apple_architecture_selection_file(</span><span class="nv">&lt;filename&gt;</span>
<span class="w">  </span><span class="no">INSTALL_DESTINATION</span><span class="w"> </span><span class="nv">&lt;path&gt;</span>
<span class="w">  </span><span class="p">[</span><span class="no">INSTALL_PREFIX</span><span class="w"> </span><span class="nv">&lt;path&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="p">[</span><span class="no">SINGLE_ARCHITECTURES</span><span class="w"> </span><span class="nv">&lt;arch&gt;...</span>
<span class="w">   </span><span class="no">SINGLE_ARCHITECTURE_INCLUDE_FILES</span><span class="w"> </span><span class="nv">&lt;file&gt;...</span><span class="p">]</span>
<span class="w">  </span><span class="p">[</span><span class="no">UNIVERSAL_ARCHITECTURES</span><span class="w"> </span><span class="nv">&lt;arch&gt;...</span>
<span class="w">   </span><span class="no">UNIVERSAL_INCLUDE_FILE</span><span class="w"> </span><span class="nv">&lt;file&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="p">[</span><span class="no">ERROR_VARIABLE</span><span class="w"> </span><span class="nv">&lt;variable&gt;</span><span class="p">]</span>
<span class="w">  </span><span class="nf">)</span>
</pre></div>
</div>
<p>Write a file that includes an Apple-architecture-specific <code class="docutils literal notranslate"><span class="pre">.cmake</span></code> file
based on <span class="target" id="index-0-variable:CMAKE_OSX_ARCHITECTURES"></span><a class="reference internal" href="../variable/CMAKE_OSX_ARCHITECTURES.html#variable:CMAKE_OSX_ARCHITECTURES" title="CMAKE_OSX_ARCHITECTURES"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_OSX_ARCHITECTURES</span></code></a>, e.g., for inclusion from an
Apple-specific <code class="docutils literal notranslate"><span class="pre">&lt;PackageName&gt;Config.cmake</span></code> file.</p>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">INSTALL_DESTINATION</span> <span class="pre">&lt;path&gt;</span></code></dt><dd><p>Path to which the generated file will be installed by the caller, e.g.,
via <span class="target" id="index-1-command:install"></span><a class="reference internal" href="../command/install.html#files" title="install(files)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">install(FILES)</span></code></a>.  The path may be either relative to the
<code class="docutils literal notranslate"><span class="pre">INSTALL_PREFIX</span></code> or absolute.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">INSTALL_PREFIX</span> <span class="pre">&lt;path&gt;</span></code></dt><dd><p>Path prefix to which the package will be installed by the caller.
The <code class="docutils literal notranslate"><span class="pre">&lt;path&gt;</span></code> argument must be an absolute path.  If this argument
is not passed, the <span class="target" id="index-3-variable:CMAKE_INSTALL_PREFIX"></span><a class="reference internal" href="../variable/CMAKE_INSTALL_PREFIX.html#variable:CMAKE_INSTALL_PREFIX" title="CMAKE_INSTALL_PREFIX"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_INSTALL_PREFIX</span></code></a> variable will be
used instead.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">SINGLE_ARCHITECTURES</span> <span class="pre">&lt;arch&gt;...</span></code></dt><dd><p>Architectures provided by entries of <code class="docutils literal notranslate"><span class="pre">SINGLE_ARCHITECTURE_INCLUDE_FILES</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">SINGLE_ARCHITECTURE_INCLUDE_FILES</span> <span class="pre">&lt;file&gt;...</span></code></dt><dd><p>Architecture-specific files.  One of them will be loaded
when <span class="target" id="index-1-variable:CMAKE_OSX_ARCHITECTURES"></span><a class="reference internal" href="../variable/CMAKE_OSX_ARCHITECTURES.html#variable:CMAKE_OSX_ARCHITECTURES" title="CMAKE_OSX_ARCHITECTURES"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_OSX_ARCHITECTURES</span></code></a> contains a single
architecture matching the corresponding entry of
<code class="docutils literal notranslate"><span class="pre">SINGLE_ARCHITECTURES</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">UNIVERSAL_ARCHITECTURES</span> <span class="pre">&lt;arch&gt;...</span></code></dt><dd><p>Architectures provided by the <code class="docutils literal notranslate"><span class="pre">UNIVERSAL_INCLUDE_FILE</span></code>.</p>
<p>The list may include <code class="docutils literal notranslate"><span class="pre">$(ARCHS_STANDARD)</span></code> to support consumption using
the <span class="target" id="index-0-generator:Xcode"></span><a class="reference internal" href="../generator/Xcode.html#generator:Xcode" title="Xcode"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Xcode</span></code></a> generator, but the architectures should always
be listed individually too.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">UNIVERSAL_INCLUDE_FILE</span> <span class="pre">&lt;file&gt;</span></code></dt><dd><p>A file to load when <span class="target" id="index-2-variable:CMAKE_OSX_ARCHITECTURES"></span><a class="reference internal" href="../variable/CMAKE_OSX_ARCHITECTURES.html#variable:CMAKE_OSX_ARCHITECTURES" title="CMAKE_OSX_ARCHITECTURES"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_OSX_ARCHITECTURES</span></code></a> contains
a (non-strict) subset of the <code class="docutils literal notranslate"><span class="pre">UNIVERSAL_ARCHITECTURES</span></code> and
does not match any one of the <code class="docutils literal notranslate"><span class="pre">SINGLE_ARCHITECTURES</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">ERROR_VARIABLE</span> <span class="pre">&lt;variable&gt;</span></code></dt><dd><p>If the consuming project is built for an unsupported architecture,
set <code class="docutils literal notranslate"><span class="pre">&lt;variable&gt;</span></code> to an error message.  The includer may use this
information to pretend the package was not found.  If this option
is not given, the default behavior is to issue a fatal error.</p>
</dd>
</dl>
</dd></dl>

</section>
<section id="example-generating-package-files">
<span id="cmakepackageconfighelpers-examples"></span><h2>Example Generating Package Files<a class="headerlink" href="#example-generating-package-files" title="Link to this heading">¶</a></h2>
<p>Example using both the <span class="target" id="index-0-command:configure_package_config_file"></span><a class="reference internal" href="#command:configure_package_config_file" title="configure_package_config_file"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">configure_package_config_file()</span></code></a> and
<span class="target" id="index-0-command:write_basic_package_version_file"></span><a class="reference internal" href="#command:write_basic_package_version_file" title="write_basic_package_version_file"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">write_basic_package_version_file()</span></code></a> commands:</p>
<div class="literal-block-wrapper docutils container" id="id1">
<div class="code-block-caption"><span class="caption-text"><code class="docutils literal notranslate"><span class="pre">CMakeLists.txt</span></code></span><a class="headerlink" href="#id1" title="Link to this code">¶</a></div>
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">include(</span><span class="nb">GNUInstallDirs</span><span class="nf">)</span>
<span class="nf">set(</span><span class="no">INCLUDE_INSTALL_DIR</span><span class="w"> </span><span class="o">${</span><span class="nt">CMAKE_INSTALL_INCLUDEDIR</span><span class="o">}</span><span class="na">/Foo</span>
<span class="w">    </span><span class="no">CACHE</span><span class="w"> </span><span class="no">PATH</span><span class="w"> </span><span class="s">&quot;Location of header files&quot;</span><span class="w"> </span><span class="nf">)</span>
<span class="nf">set(</span><span class="no">SYSCONFIG_INSTALL_DIR</span><span class="w"> </span><span class="o">${</span><span class="nt">CMAKE_INSTALL_SYSCONFDIR</span><span class="o">}</span><span class="na">/foo</span>
<span class="w">    </span><span class="no">CACHE</span><span class="w"> </span><span class="no">PATH</span><span class="w"> </span><span class="s">&quot;Location of configuration files&quot;</span><span class="w"> </span><span class="nf">)</span>
<span class="c">#...</span>
<span class="nf">include(</span><span class="nb">CMakePackageConfigHelpers</span><span class="nf">)</span>
<span class="nf">configure_package_config_file(</span><span class="nb">FooConfig.cmake.in</span>
<span class="w">  </span><span class="o">${</span><span class="nt">CMAKE_CURRENT_BINARY_DIR</span><span class="o">}</span><span class="na">/FooConfig.cmake</span>
<span class="w">  </span><span class="no">INSTALL_DESTINATION</span><span class="w"> </span><span class="o">${</span><span class="nt">CMAKE_INSTALL_LIBDIR</span><span class="o">}</span><span class="na">/cmake/Foo</span>
<span class="w">  </span><span class="no">PATH_VARS</span><span class="w"> </span><span class="no">INCLUDE_INSTALL_DIR</span><span class="w"> </span><span class="no">SYSCONFIG_INSTALL_DIR</span><span class="nf">)</span>
<span class="nf">write_basic_package_version_file(</span>
<span class="w">  </span><span class="o">${</span><span class="nt">CMAKE_CURRENT_BINARY_DIR</span><span class="o">}</span><span class="na">/FooConfigVersion.cmake</span>
<span class="w">  </span><span class="no">VERSION</span><span class="w"> </span><span class="m">1.2.3</span>
<span class="w">  </span><span class="no">COMPATIBILITY</span><span class="w"> </span><span class="nb">SameMajorVersion</span><span class="w"> </span><span class="nf">)</span>
<span class="nf">install(</span><span class="no">FILES</span><span class="w"> </span><span class="o">${</span><span class="nt">CMAKE_CURRENT_BINARY_DIR</span><span class="o">}</span><span class="na">/FooConfig.cmake</span>
<span class="w">              </span><span class="o">${</span><span class="nt">CMAKE_CURRENT_BINARY_DIR</span><span class="o">}</span><span class="na">/FooConfigVersion.cmake</span>
<span class="w">        </span><span class="no">DESTINATION</span><span class="w"> </span><span class="o">${</span><span class="nt">CMAKE_INSTALL_LIBDIR</span><span class="o">}</span><span class="na">/cmake/Foo</span><span class="w"> </span><span class="nf">)</span>
</pre></div>
</div>
</div>
<div class="literal-block-wrapper docutils container" id="id2">
<div class="code-block-caption"><span class="caption-text"><code class="docutils literal notranslate"><span class="pre">FooConfig.cmake.in</span></code></span><a class="headerlink" href="#id2" title="Link to this code">¶</a></div>
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">set(</span><span class="no">FOO_VERSION</span><span class="w"> </span><span class="nb">x.y.z</span><span class="nf">)</span>
<span class="p">...</span>
<span class="no">@PACKAGE_INIT</span><span class="err">@</span>
<span class="p">...</span>
<span class="nf">set_and_check(</span><span class="no">FOO_INCLUDE_DIR</span><span class="w"> </span><span class="s">&quot;@PACKAGE_INCLUDE_INSTALL_DIR@&quot;</span><span class="nf">)</span>
<span class="nf">set_and_check(</span><span class="no">FOO_SYSCONFIG_DIR</span><span class="w"> </span><span class="s">&quot;@PACKAGE_SYSCONFIG_INSTALL_DIR@&quot;</span><span class="nf">)</span>

<span class="nf">check_required_components(</span><span class="nb">Foo</span><span class="nf">)</span>
</pre></div>
</div>
</div>
</section>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="Main">
        <div class="sphinxsidebarwrapper">
  <div>
    <h3>Table of Contents</h3>
    <ul>
<li><a class="reference internal" href="#">CMakePackageConfigHelpers</a><ul>
<li><a class="reference internal" href="#generating-a-package-configuration-file">Generating a Package Configuration File</a></li>
<li><a class="reference internal" href="#generating-a-package-version-file">Generating a Package Version File</a></li>
<li><a class="reference internal" href="#generating-an-apple-platform-selection-file">Generating an Apple Platform Selection File</a></li>
<li><a class="reference internal" href="#generating-an-apple-architecture-selection-file">Generating an Apple Architecture Selection File</a></li>
<li><a class="reference internal" href="#example-generating-package-files">Example Generating Package Files</a></li>
</ul>
</li>
</ul>

  </div>
  <div>
    <h4>Previous topic</h4>
    <p class="topless"><a href="CMakeGraphVizOptions.html"
                          title="previous chapter">CMakeGraphVizOptions</a></p>
  </div>
  <div>
    <h4>Next topic</h4>
    <p class="topless"><a href="CMakePrintHelpers.html"
                          title="next chapter">CMakePrintHelpers</a></p>
  </div>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/module/CMakePackageConfigHelpers.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<search id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="CMakePrintHelpers.html" title="CMakePrintHelpers"
             >next</a> |</li>
        <li class="right" >
          <a href="CMakeGraphVizOptions.html" title="CMakeGraphVizOptions"
             >previous</a> |</li>
  <li>
    <label class="sidebar-toggle" for="sidebar-check"></label>
  </li>
  <li class="rootlink">
    <img src="../_static/cmake-logo-16.png" width="16" height="16" alt=""/>
    <a href="https://cmake.org/">CMake 4.1.1</a>
    <span class="reldelim1"> &#187;</span>
  </li>
  <li>
    <a href="../index.html">Documentation</a> &#187;
  </li>

          <li class="nav-item nav-item-1"><a href="../manual/cmake-modules.7.html" >cmake-modules(7)</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">CMakePackageConfigHelpers</a></li> 
      </ul>
    </div>

    <div class="footer" role="contentinfo">
    &#169; Copyright 2000-2025 Kitware, Inc. and Contributors.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.
    </div>
<script type="text/javascript">
(function() {
  "use strict";
  const hide = () => document.getElementById("sidebar-check").checked = false;
  addEventListener("keydown", e => (e.key === "Escape") && hide());
  addEventListener("click", e => (e.target.tagName === "A") && hide());
  addEventListener("hashchange", hide)
})();
</script>
  </body>
</html>